led     equ    $e003
slider  equ    $e005
bar     equ    $e007

rst      equ   0
main     equ   $400
stackptr equ   $1000
isr4     equ   $a00
ilevel4  equ   $070
ilevel3  equ   $06c
ilevel7  equ   $07c
isr7     equ   $b00
isr3     equ   $c00
          org   rst
          dc.l  stackptr
          dc.l  main

          org   ilevel3
          dc.l  isr3

          org   ilevel4
          dc.l  isr4

          org   ilevel7
          dc.l  isr7


           org main
           move #$2600,sr    ;enable interrupt level 4 and upper
loop       move.b slider,d0
           move.b d0,bar
           bra  loop
           nop



           org isr4
           movem.l d0,-(a7)
           move.b led,d0
           eor.b #$10,d0   ; 00010000
           move.b d0,led
           movem.l (a7)+,d0
           rte

           org isr7
           movem.l d0,-(a7)
           move.b led,d0
           eor.b #$80,d0   ; 10000000
           move.b d0,led
           movem.l (a7)+,d0
           rte


           org isr3
           movem.l d0,-(a7)
           move.b led,d0
           eor.b #$04,d0   ; 00001000
           move.b d0,led
           movem.l (a7)+,d0
           rte









